<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ page 
 		import="com.raul.noticias.beens.Noticia"
 		%>
<%
	Noticia noticia =(Noticia) request.getAttribute("noticia");

	String cont = "";
	//include ('funciones/class.dbController.php');
		
	//$db= dbController::singleton();
	/*echo'<pre>';
	print_r($_GET);
	echo'</pre>';*/
	//$sql = "select * from noticia where idnoticia = ". $_GET['id'];
	//echo $sql;
	//$res = $db->query($sql);
	//$row = mysql_fetch_assoc($res);
	
	//$sql = "select * from imagenes where noticia = ". $_GET['id'];
	//echo $sql;
	//$res2 = $db->query($sql);
	//$rowI = mysql_fetch_assoc($res2);
	//echo $rowI['nombre'];
 	//cont += "<div style=\"width:200px;  height: 400px;float: left;\">\n";
	//cont += "<img src=\"../../imagenesN/"+ ['nombre'].'" style="width:100%; height: 100%;" />';
	//$cont .= '	<span style="width: 100%; font-size:10px; color: #A4A4A4;">Foto del Ferrari F138</span>';
  	//$cont .= '</div>';
    cont +="<div class=\"clean\"></div>";
	cont += "<div style=\"width:500px; float: left; margin-left:30px; margin-bottom:15px;\"><h2 id=\"titul\">" + noticia.getTitular() +"</h2></div>";
	cont += "<div style=\"width:500px; float: left; margin-left:30px; margin-bottom:15px;\"><h2 id=\"subtit\">"+ noticia.getSubTitular() +"</h2></div>";
	cont += "<div style=\"width:500px; float: left; margin-left:30px; margin-bottom:15px;\"><h2 id=\"entrad\">"+ noticia.getEntradilla()+"</h2></div>";
	cont += "<div class=\"clean\"></div>";
	cont += "<div style=\"width: 500px; margin-left:30px; float: left; overflow: visible;\" id=\"cuerpo\">" + noticia.getCuerpo() + "</div>";
%>


<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />

		<!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame
		Remove this if you use the .htaccess -->
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />

		<title><%=noticia.getTitular() %></title>
		<meta name="description" content="" />
		<meta name="author" content="Raul" />

		<meta name="viewport" content="width=device-width; initial-scale=1.0" />
		<link rel="stylesheet" href="css/reset.css" />
		
		<link rel="stylesheet" href="css/jquery-ui.css" />
		<script src="script/jquery-1.9.1.js"></script>
		<script src="script/jquery-ui-1.10.3.custom.js"></script>
		<link rel="stylesheet" href="css/estilos.css" />
		<!-- Replace favicon.ico & apple-touch-icon.png in the root of your domain and delete these references -->
		<link rel="shortcut icon" href="/favicon.ico" />
		<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
		 <script>
			$(function() {
				$( "#menu" ).accordion({
					heightStyle: "content"
				});
				
				var ventana_ancho = $(window).width();
			    var ventana_alto = $(window).height();
			    var tamano = $('#wrapper').height() + (ventana_alto - $('#wrapper').height())-10;
			    $('#wrapper').css("min-height",tamano);
			    
			});
			
		</script>
	</head>

	<body>
		<div id="wrapper">
			<header id="head">
				<%@ include file="includes/cabecera.jsp" %>
			</header>
			<div class="clean"></div>
			<nav style="float: left;">
				<%@ include file="includes/menu.jsp" %>
			</nav>

			<div id="contenido" style="overflow:hidden;">
				<%=cont %>
			</div>
			<div class="clean"></div>
			<footer>
				<p>
					
				</p>
			</footer>
		</div>
	</body>
</html>
